package com.mechat.common.user.controller;


import com.mechat.common.common.domain.vo.resp.ApiResult;
import com.mechat.common.common.utils.RequestHolder;
import com.mechat.common.user.domain.vo.resp.user.UserEmojiResp;
import com.mechat.common.user.service.UserEmojiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户表情包 前端控制器
 * </p>
 *
 * @author <a href="https://gitee.com/sunxiaojie/mechat"></a>
 * @since 2024-01-23
 */
@RestController
@RequestMapping("/capi/user/emoji")
@Api(tags = "用户表情包管理相关接口")
public class UserEmojiController {
    @Resource
    private UserEmojiService emojiService;
    @GetMapping("/list")
    @ApiOperation("表情包列表")
    public ApiResult<List<UserEmojiResp>> getEmojisPage() {
        return ApiResult.success(emojiService.list(RequestHolder.get().getUid()));
    }
}

